import request from '@/utils/request'

// 查询销售记录列表
export function listSale(query) {
  return request({
    url: '/bk/sale/list',
    method: 'get',
    params: query
  })
}

// 查询销售记录详细
export function getSale(id) {
  return request({
    url: '/bk/sale/' + id,
    method: 'get'
  })
}

// 新增销售记录
export function addSale(data) {
  return request({
    url: '/bk/sale',
    method: 'post',
    data: data
  })
}

// 修改销售记录
export function updateSale(data) {
  return request({
    url: '/bk/sale',
    method: 'put',
    data: data
  })
}

// 删除销售记录
export function delSale(id) {
  return request({
    url: '/bk/sale/' + id,
    method: 'delete'
  })
}
